/*=========================================================================
# Project Overview
===========================================================================
Project Name    : Weplugins Plugin Core
Author          : Weplugins
Developer       : Dinesh Suthar
Version         : 3.0.9
Created On      : 15 March 2025
Last Updated    : 15 march 2025
Description     : This stylesheet is designed for an weplugins. 
                  Includes responsive design principles and accessibility.
===========================================================================*/

/*=========================================================================
# General Guidelines
===========================================================================
1. Maintain a modular approach for styles.
2. Test styles across all major browsers (Chrome, Firefox, Safari, Edge).
3. Ensure proper accessibility (e.g., WCAG compliance).
===========================================================================*/

/* Embedded font family
===========================================================================*/
@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

/* Variables
===========================================================================*/
:root {
  /* Colors */
  --wth-black: #000000;
  --wth-white: #ffffff;
  --wth-primary: #4390ff;
  --wth-primary-hover: #1572f5;
  --wth-secondary: #f5f7fa;
  --wth-secondary-hover: #e7e9ec;
  --wth-like: #00dd58;
  --wth-dislike: #ff4444;
  --wth-error: #ff4444;
  --wth-dark: #23272f;

  /* Border */
  --wth-border-width: 1px;
  --wth-border-style: solid;
  --wth-border-color: #ebf1fa;

  /* Other Variables */
  --wth-border-radius: 6px;
  --wth-border-radius-circle: 50%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  :root {
    scroll-behavior: smooth;
  }
}

/* Browser native scrollbar
===========================================================================*/
* {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar:horizontal {
  height: 4px;
}

::-webkit-scrollbar-track {
  border-radius: 4px;
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.4);
}

::-webkit-scrollbar-thumb:window-inactive {
  background: rgba(0, 0, 0, 0.2);
}

/* Keyframe
===========================================================================*/
@-webkit-keyframes wth-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes wth-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@-webkit-keyframes wth-zoom-in {
  from {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }
}

@keyframes wth-zoom-in {
  from {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }
}

/* Helper Classes
===========================================================================*/
.wth-border-radius-circle {
  border-radius: var(--wth-border-radius-circle) !important;
}

/* Widget helpful
===========================================================================*/
.wth-helpful-wrapper {
  --wth-helpful-padding-y: 30px;
  --wth-helpful-padding-x: 30px;
  --wth-helpful-border-radius: 20px;
  --wth-helpful-bg: #f5f7fa;
  --wth-helpful-color: #23272f;
  --wth-helpful-font-size: 16px;
  --wth-helpful-font-weight: 400;
  --wth-helpful-font-family: inherit;
  --wth-helpful-title-font-size: 16px;
  --wth-helpful-title-font-weight: 500;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--wth-helpful-bg);
  padding: var(--wth-helpful-padding-y) var(--wth-helpful-padding-x);
  color: var(--wth-helpful-color);
  font-size: var(--wth-helpful-font-size);
  font-weight: var(--wth-helpful-font-weight);
  font-family: var(--wth-helpful-font-family);
  border-radius: var(--wth-helpful-border-radius);
  width: 100%;
}

.wth-helpful-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wth-helpful-title {
  font-size: var(--wth-helpful-title-font-size);
  font-weight: var(--wth-helpful-title-font-weight);
}

.wth-helpful-extra-block {
  display: none; /* Hidden by default */
  flex-direction: column;
  gap: 10px;
}

.wth-helpful-extra-block:not(:first-child) {
  margin-top: 20px;
}

@media screen and (min-width: 576px) {
  .wth-helpful-wrapper:not(.direction-vertical) .wth-helpful-container {
    flex-direction: row;
  }
  .wth-helpful-wrapper:not(.direction-vertical) .wth-helpful-title {
    align-self: center;
  }
}

/* Helpful alignments style */
.align-center {
  align-items: center;
  text-align: center;
}
.align-right {
  align-items: flex-end;
  text-align: right;
}

/* Form Control Input & Textarea
===========================================================================*/
textarea.wth-feedback-textarea,
input.wth-form-control {
  --wth-form-control-padding-y: 12px;
  --wth-form-control-padding-x: 20px;
  --wth-form-control-font-size: 16px;
  --wth-form-control-font-weight: 400;
  --wth-form-control-line-height: 20px;
  --wth-form-control-bg: #fff;
  --wth-form-control-color: #23272f;
  --wth-form-control-placeholder-color: #868e96;
  --wth-form-control-border-width: 1px;
  --wth-form-control-border-color: #f2f4f8;
  --wth-form-control-active-border-color: var(--wth-primary);
  --wth-form-control-box-shadow: none;
  --wth-form-control-active-box-shadow: none;
  --wth-form-control-border-radius: var(--wth-border-radius);
  --wth-form-control-height: 52px;
  position: relative;
  display: block;
  margin: 0;
  width: 100%;
  padding: var(--wth-form-control-padding-y) var(--wth-form-control-padding-x);
  font-size: var(--wth-form-control-font-size);
  font-weight: var(--wth-form-control-font-weight);
  line-height: var(--wth-form-control-line-height);
  color: var(--wth-form-control-color);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: var(--wth-form-control-bg);
  background-clip: padding-box;
  box-shadow: var(--wth-form-control-box-shadow);
  border: var(--wth-form-control-border-width) solid
    var(--wth-form-control-border-color);
  border-radius: var(--wth-form-control-border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  .wth-form-control {
    transition: none;
  }
}

textarea.wth-feedback-textarea {
  --wth-textarea-height: 120px;
  min-height: var(--wth-textarea-height);
}

textarea.wth-feedback-textarea:focus,
input.wth-form-control:focus {
  color: var(--wth-form-control-color);
  background-color: var(--wth-form-control-bg);
  border-color: var(--wth-form-control-active-border-color);
  box-shadow: var(--wth-form-control-active-box-shadow);
  outline: 0;
}

textarea.wth-feedback-textarea::-moz-placeholder,
input.wth-form-control::-moz-placeholder {
  color: var(--wth-form-control-placeholder-color);
  opacity: 1;
}

textarea.wth-feedback-textarea::placeholder,
input.wth-form-control::placeholder {
  color: var(--wth-form-control-placeholder-color);
  opacity: 1;
}

textarea.wth-feedback-textarea.wth-feedback-error {
  border-color: var(--wth-error);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

textarea.wth-feedback-textarea.wth-feedback-error::-moz-placeholder {
  --wth-form-control-placeholder-color: var(--wth-error);
}

textarea.wth-feedback-textarea.wth-feedback-error::placeholder {
  --wth-form-control-placeholder-color: var(--wth-error);
}

/* Button
===========================================================================*/
.wth-btn {
  --wth-btn-padding-x: 24px;
  --wth-btn-padding-y: 10px;
  --wth-btn-font-family: "Inter", serif;
  --wth-btn-font-size: 16px;
  --wth-btn-font-weight: 500;
  --wth-btn-line-height: 20px;
  --wth-btn-color: #23272f;
  --wth-btn-bg: transparent;
  --wth-btn-box-shadow: none;
  --wth-btn-border-width: var(--wth-border-width);
  --wth-btn-border-color: transparent;
  --wth-btn-border-radius: var(--wth-border-radius);
  --wth-btn-hover-border-color: transparent;
  --wth-btn-disabled-opacity: 0.5;
  display: inline-flex;
  padding: var(--wth-btn-padding-y) var(--wth-btn-padding-x);
  font-family: var(--wth-btn-font-family);
  font-size: var(--wth-btn-font-size);
  font-weight: var(--wth-btn-font-weight);
  line-height: var(--wth-btn-line-height);
  color: var(--wth-btn-color);
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: var(--wth-btn-border-width) solid var(--wth-btn-border-color);
  border-radius: var(--wth-btn-border-radius);
  background-color: var(--wth-btn-bg);
  box-shadow: var(--wth-btn-box-shadow);
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  .wth-btn {
    transition: none;
  }
}

.wth-btn:hover,
.wth-btn:focus,
.wth-btn:focus-visible {
  color: var(--wth-btn-hover-color);
  background-color: var(--wth-btn-hover-bg);
  border-color: var(--wth-btn-hover-border-color);
  outline: 0;
}

.wth-btn:disabled,
.wth-btn-disabled,
.wth-btn.disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: var(--wth-btn-disabled-opacity);
}

.wth-btn-submit {
  --wth-btn-color: var(--wth-white);
  --wth-btn-bg: var(--wth-primary);
  --wth-btn-border-color: var(--wth-primary);
  --wth-btn-hover-color: var(--wth-white);
  --wth-btn-hover-bg: var(--wth-primary-hover);
  --wth-btn-hover-border-color: var(--wth-primary-hover);
}

.wth-btn-cancel {
  --wth-btn-color: var(--wth-dark);
  --wth-btn-bg: var(--wth-secondary);
  --wth-btn-border-color: var(--wth-secondary);
  --wth-btn-hover-color: var(--wth-dark);
  --wth-btn-hover-bg: var(--wth-secondary-hover);
  --wth-btn-hover-border-color: var(--wth-secondary-hover);
}

.wth-btn-like {
  --wth-btn-color: var(--wth-white);
  --wth-btn-bg: var(--wth-like);
  --wth-btn-border-color: var(--wth-like);
  --wth-btn-hover-color: var(--wth-white);
  --wth-btn-hover-bg: #00c851;
  --wth-btn-hover-border-color: #00c851;
}

.wth-btn-dislike {
  --wth-btn-color: var(--wth-white);
  --wth-btn-bg: var(--wth-dislike);
  --wth-btn-border-color: var(--wth-dislike);
  --wth-btn-hover-color: var(--wth-white);
  --wth-btn-hover-bg: #f12c2c;
  --wth-btn-hover-border-color: #f12c2c;
}

.wth-btn-icon {
  --wth-btn-padding-x: 5px;
  --wth-btn-padding-y: 5px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wth-btn:not(.wth-btn-icon) > i,
.wth-btn:not(.wth-btn-icon) > [class*="ri-"] {
  margin-right: 8px;
  align-self: center;
}

.wth-btn-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Modal style
===========================================================================*/
.wth-modal-overlay {
  --wth-modal-width: 520px;
  --wth-modal-bg: #ffffff;
  --wth-modal-color: var(--wth-dark);
  --wth-modal-overlay-bg: rgba(0, 0, 0, 0.6);
  --wth-modal-border-radius: var(--wth-border-radius);
  --wth-modal-box-shadow: 0 4px 7px rgba(0, 0, 0, 0.15);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  background-color: var(--wth-modal-overlay-bg);
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  -webkit-animation: wth-fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) 1;
  animation: wth-fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) 1;
}

.wth-modal {
  background-color: var(--wth-modal-bg);
  color: var(--wth-modal-color);
  border-radius: var(--wth-modal-border-radius);
  box-shadow: var(--wth-modal-box-shadow);
  width: 100%;
  max-width: var(--wth-modal-width);
  margin-inline: 10px;
  -webkit-animation: wth-zoom-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) 1;
  animation: wth-zoom-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) 1;
}

.wth-modal-header {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--wth-border-color);
}

.wth-modal-header .title {
  font-size: 20px;
  font-weight: 600;
}

.wth-modal-header .wth-btn-icon {
  margin-left: auto;
  margin-right: -12px;
}

.wth-modal-body {
  padding: 20px;
}

.wth-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
}

.wth-modal-footer:not(:first-child) {
  padding-top: 0;
}
